Search Results: "Vincent Fourmond"

11 June 2015

Vincent Fourmond: Release 0.13 of ctioga2

Today is ctioga2's release. Unlike most other release, this one does not bring many visible features, but quite a few changes nevertheless, including:
As usual, the new version is available as a gem
~ gem update ctioga
Enjoy !

7 June 2015

Vincent Fourmond: Release 1.19 of Tioga

I've just released Tioga version 1.19. It fixes a couple of bugs, and finally brings the possibility to change the resolution of the target PDF file. A version of ctioga2 that needs this new feature should be published soon. Enjoy !

24 March 2015

Vincent Fourmond: Release 0.12 of ctioga2

Out is the new version of ctioga2, which brings:
As usual, the new release is available as a gem:
~ gem update ctioga2
The website has also been decently improved, with now a search box for finding images in the gallery

26 January 2015

Vincent Fourmond: Linux kernels for a macbook pro retina

I was unhappy about the recent Linux (3.14-3.16, and I think 3.17 too) kernels on my Macbook Pro Retina (15'), for a few reasons:The latest 3.18-trunk kernel fixes essentially all the above problems, which is just great. Kudos to everyone involved ! Hope it helps...

2 January 2015

Vincent Fourmond: Release 0.11 of ctioga2

The new year is starting with a new release of ctioga2, with a lot of new features, such as:
The new release is of course available using rubygems:
~ gem update ctioga2
It can also be downloaded from sourceforge.The possibilities of the new styling system are particularly interesting, and I'm working on ways to make it more powerful, and providing series of default style files that anyone could use as they want. Among other future changes, I want to improve the position of ticks, especially when using non-linear axes, and add functions to draw vector fields (though this still needs some thinking). Enjoy, and a happy new year to everyone !

Vincent Fourmond: New home for Tioga

Now, it's been a long time since Rubyforge has become unusable, and the Tioga project (on which ctioga2 is based) was still hosted there. I first wanted to thanks Rubyforge for hosting our projects for so long, and then say that Tioga is now maintained in sourceforge in a git repository. The web page is hosted by sourceforge as well, and that includes the documentation. A clone of the git repository is available on github. Enjoy !

7 March 2014

Vincent Fourmond: Removing the background of an image

While in the process of polishing up a paper, I had to draw figures using a well-known proprietary program for drawing chemical formula whose name I will not write down, out of decency (but you know which one it is anyway). I'm using the mac version (yes, no version for Linux) which has a neat glitch in that the "Save As" button does not work at all: no way to export your chemical formula as a SVG/PDF/PNG picture or whatever ! So I resorted to the neat Print as PDF feature of macintosh. I had to edit the resulting PDF files by hand as some of the colors were wrong (great !), and when I tried to include the PDF, I realized they had a white background... No way !So I dug in ImageMagick's convert documentation, and came up with the following code that converts the PDF file into a PNG with a transparent background:
convert -density 600 figure.pdf -channel alpha \
  -fx '((r == 1 && g == 1 && b == 1) ? 0 : 1)' figure.png
There are still some few points that look white but are probably not that white (due to antialiased rendering of the PDF file ?). There are many more things that can be done using the -fx operator, this page was helpful to me !Edit: while the alpha channel seems to be on by default for PDF files, it is not necessarily the case for all images. If the above doesn't work, try adding -alpha Set before the -fx bit.

1 January 2014

Vincent Fourmond: Rubyforge is dead, but ctioga2 goes on...

In the light of the frequent recent downtimes of rubyforge, and thanks to the information from @copiousfreetime, I finally decided to move the hosting of ctioga2 away from rubyforge, to sourceforge. Transition went smooth, git is now the only VCS. Code is hosted at sourceforge and mirrored at github.
Work goes on on ctioga2. I've recently implemented a decent support for histograms. It is already much more powerful than the one in the old ctioga, but it is far from being feature-full. Here's a preview.I'm slowly preparing a new release for ctioga2, that would incorporate quite some fixes since the last time, and quite a few nice features in addition to the histograms. Stay tuned !

12 October 2013

Vincent Fourmond: 8 months with a macbook pro retina 15''

Back in February, I wanted a new laptop for my work, so I bought a fancy Dell Latitude E6540 laptop. Bad luck, it was giving my sore eyes and horrible headaches, to the point I couldn't work more than a dozen minutes with it. As in my work, we were not allowed to buy PC laptops with any other vendor, my boss convinced me to get a 15'' macbook pro retina (yes that's about as expensive a laptop as you can get). Although quite reluctant at first, I did need a new laptop, so I gave in. Of course, I had to install debian on it. I booted once or twice on macos to leave enough space for Debian and install rEFIt so that I could boot into it. I had to use version 3.9 of linux else it wouldn't boot.After about 8 month, I must say I'm quite pleased with the beast. The retina display is very neat (a 2880x1800 resolution!), and it is pretty fast. There are two annoyances though:Another point is the update of GRUB: Debian's post-install scripts don't play nice with the EFI setup, so here is what I have to do to update to a newer version of grub, (and it's also what I had to do initially to install GRUB):
# mount /dev/sda1 /mnt
# grub-install --efi-directory=/mnt
The /dev/sda1 partition is the so-called EFI partition. I think it is created by rEFIt and it is essentially empty.

7 October 2013

Vincent Fourmond: Release 0.7 of ctioga2

Quite a bit of work has gone into ctioga2 since my last post. Among the most interesting features, ctioga2 now features:
The latter feature proved actually instrumental in a research project under way in my lab (which is why I wrote it in the first place). It is demonstrated in the image above, made using this code.I've also started the gnuplot versus ctioga2 gallery I was speaking about in my last post, where I try to reproduce most of gnuplot's examples using ctioga2; it can be found here. While I don't like so much the look of the gnuplot graphs, and I try to keep the look of ctioga2's as close as possible to that look, it proved invaluable in detecting small bugs, fixing small glitches and providing inspiration for new features.In the meantime, my todo-list for ctioga2 doesn't seem to get any smaller. Let's hope I'll implement them fast enough ! Keep posted...

31 August 2013

Vincent Fourmond: First release of Tioga that works on win32

While I usually don't announce releases of tioga, as it is now mostly in maintenance mode, with not a lot of new features, today is a different story. I finally got around to try and build it on windows, and after a bit of a fight, I got it to compile and work there (I got hit by the classical fopen(file, "w") for binary files, that don't make any difference on Linux and Mac, but that do on Windows...). The release is already available on the rubyforge download page. Gems will be available later on today.To actually make it work on windows, here is what you need to install:And that's it ! That also means that ctioga2 works on windows, if you run:
gem install ctioga2

26 August 2013

Vincent Fourmond: Announcing version 0.5 of ctioga2

I've just released version 0.5 of ctioga2, my plotting program. While there is still quite a lot of improvements I'd like to get in some day, the past few days have seen a lot of activity. Probably the most important change is the new space-separated command file format, much simpler than the old one (which is still supported, although marked clearly as deprecated now). Another important change for the users is the large improvement of error reporting: in most cases, ctioga2 pinpoints the exact location where things go wrong; it also features reporting on LaTeX errors. The last important feature is also the introduction of real contour plots, such as the one below, coming from the documentation:
Now, I feel like ctioga2 is coming close to gnuplot in terms of features and ease of use. Part of my plans for the website is to create a gnuplot mockup gallery, in which I would take as many examples from the gnuplot website as possible (ie all the ones ctioga2 can reproduce) and compare the code and look of both.Among features I'd like to implement for ctioga2, here are the ones that I think are the most important ones:But maybe you have other ideas you'd like to see before that ?

31 July 2013

Vincent Fourmond: Importing lots of files into git-annex

If, like me, you find git-annex very appealing, but have been moving files without it for a while, here is a little script that may help you through the transition. I've just converted my MP3 library to git-annex, but, now I must convert all my copies of the library on various computers to track one (or more) of them. The trick is to teach git-annex about the already existing files, as re-downloading a 20GB library through a 80 KB/s upload DSL line doesn't sound that funny. Here is how I did it.First, convert one repository to using git-annex. Then, switch to another computer, move away the directory containing the files to a backup directory, and git clone the first repository. Then, from the directory created, run:
~ ./import path/to/old/backup/copy

Where import is the following script:
#! /bin/bash
src="$1"
IFS=$'\n' 
for f in $(find -type l); do 
    if stat -L "$f" >/dev/null 2>/dev/null; then
        echo "File $f ok"
    else
        tg=$(readlink "$f"   sed 's/.*git/.git/' )
        dir=$(dirname "$tg")
        if [ -r "$src/$f" ]; then
            mkdir -p "$dir"
            cp -avl "$src/$f" "$tg"
        fi
    fi
done

Once this is done, you'll need to run
~ git annex fsck

Of course, there is no warranty !! It saved me lots of download time, but it could irretrievably damage your data, put your dog in danger or set fire to your house, so use with care !

10 January 2013

Vincent Fourmond: Introducing dvdcopy, an error-resistant command-line DVD copier

My wife likes watching DVDs a lot, which is why she borrows many from the public library. The problem is that many of those were handled by people who have no clue whatsoever about the proper handling of DVDs, which means that they are in a state ranging from moderately scratched in the best cases to properly scarred in the worst ones... xine or VLC fail miserably to read such DVDs. What's worse is that failures happen right in the middle of DVDs, which is quite frustrating !That's why I've started quite some time ago to write a small C wrapper around libdvdread to first copy the DVD files onto the disk and then read them from there. It was also an easy solution to copy files to a driveless netbook to watch the DVD there. With time, this project evolved into a neat C++ command-line utility that's able to keep track of badly read sectors and come back to them later.Today is the 0.0 release of dvdcopy. You can get the tarball there. It follows the standard autoconf dance:
~ ./configure
~ make
~ make install
Using it is as simple as running:
~ dvdcopy /dev/dvd MyMovieDirectory
If everything went fine, you're set, and you can open the directory created with vlc or xine:
~ xine dvd:// pwd /MyMovieDirectory
(yes, xine needs the full path, I haven't checked with VLC, but from what I remember, you can open DVD directories directly from a menu).If you're not that lucky and dvdcopy found some bad sectors, try reading again using
~ dvdcopy --second-pass /dev/dvd MyMovieDirectory
I found that in many cases, one or two second passes get all the sectors back. While that wasn't really the intended purpose, the fact that most copy protection schemes (in addition to CSS) are implemented using bad sectors make dvdcopy quite resistant to them.I have no plan of making a Debian package for it at the time being, but if there is demand for that, I may reconsider. Enjoy !

9 January 2013

Vincent Fourmond: Lots of hard drive accesses with MacOS

Sorry, a post about MacOS again, but this is a problem my boss has been faced with, and judging by what google searches gave us as clues to go on, I thought it would be useful for others to know about this.So here it is: for a couple of weeks, my boss's Mac had been slowing down very painfully, to the point that he was just sitting in front of it waiting for web pages to show up or applications to start... We tried a whole bunch of things, such as disabling spotlight, dropbox, and even the time machine, but nothing worked. Finally, he had a look at Disk Utility that said that the disk was gone beyond repair. Fortunately, a new colleague suggested to restore from the Time Machine, holding Command-R during startup. It took ages (over a slow network), but now the machine is up again, without any slowing down.

6 January 2012

Vincent Fourmond: Graphical connection to a Mac from Linux

For my lab work, I have developed an (almost) cross-platform program based on Qt4 that help us analyze our data. One of the motivations to use Qt was the ability to port the program to other platforms, and in particular MacOSX (half of my team uses them). After installing the required development tools using MacPorts (mind you, the MacOS version of the development tools, not the X11 one), I was able to compile and run the program without a single code change on my bosses' Mac. But here come problems: several things do not work the same way in Mac and in Linux (whereas it should, I think), so additional tweaking and debugging will be necessary.This is where the problem comes in: I don't own a Mac and don't intend to, so I need to connect to my bosses' Mac in order to perform testing. How can I connect to a Mac display ? X11 connection won't work, since my application is a Mac application and not a X11 one. I had him turn on screen sharing (the most basic tick box), which sets up a VNC server on the Mac. Unfortunately, when I connect using the command-line VNC clients available for debian, ie vncviewer (from the packages xvnc4viewer or xtightvncviewer), I get the following problems:

~ vncviewer chrismac
VNC Viewer Free Edition 4.1.1 for X - built Mar 10 2010 22:31:05
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Wed Dec  7 10:40:41 2011
 CConn:       connected to host chrismac port 5900
 CConnection: Server supports RFB protocol version 3.889
 CConnection: Using RFB protocol version 3.8
 CConnection: No matching security types
 main:        No matching security types

The good news is that remmina is able to connect graphically, although for me it required that I set the display depth to 24 bits (else it seems to connect, but the connection dies immediately). Great, I'll be able to debug, then...
Edit: after a while, I found out that remmina had some drawbacks when connecting to a Mac, such as, at least in my case, a weird problem with Shift: once I hit Shift, I'm never able again to type in lowercase characters, which is quite painful. I tried also Vinagre, who handled that better (but had some quite painful freezing moment), so I must say that I finally found a client I'm happy with: gtkvncviewer.

7 June 2011

Vincent Fourmond: Record sound currently playing to file using ALSA

I've been wondering for a long time about how to record sound which is currently being played on the computer. I know the ALSA framework is powerful enough to do that, and today just proved me so (at least to some extent). It turns out that it's pretty trivial using the file PCM plugin; all you need is a stanza like this in your $HOME/.asoundrc file:
pcm.save  
    type file
    format wav
    slave.pcm front 
    # my main PCM is called front
    file output.wav
 
Afterwards, you can use this save PCM with the tools that understand it, such as aplay or mplayer:
~ aplay -Dsave stuff.wav
~ mplayer -ao alsa:device=save stuff.wav
(for xine users, you may want to have a look at the audio.device.alsa_front_device configuration element). Funnier, though, is the possibility to use it with programs that don't provide such an easy way to change that, (say, the flash player in a browser ?) via the use of the default PCM specification in $HOME/.asoundrc:
pcm.!default save
After that, all programs using the default PCM will save the sound they play as a save.wav file in their current directory - but nothing stops you from specifiying an absolute directory. Better yet, you may apparently use pipes in stead of the file name, la popen.

Vincent Fourmond: Simply impressive...

... that's what I think of the work of the FTP Team. Three uploads to NEW in one day, all of which processed in less than half a day. Truly impressive ! Many thanks to them !

26 April 2011

Vincent Fourmond: Newer xorg, missing mouse features and xinput

Recent versions of xorg have seen changes in defaults for the behaviour of mice/touchpads, such as third button emulation or edge scrolling suddenly not working anymore. What is worse now is that the corresponding entries in the xorg.conf are now ignored... Wait, wait, don't go flaming the Xorg maintainers, but keep on looking rather. This is where I found out about xinput, the new way to customize/parametrize input devices for the X server. And, lets face it, it beats any customization that could have been done in xorg.conf ! Here's how to use it. First, you'll have to install it from its own package (xinput), as it doesn't come bundled with standard X clients. Second, you can find out about the devices connected to your X server using:
~ xinput --list
  Virtual core pointer                          id=2    [master pointer  (3)]
      Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
      SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]
It is easy to find the device you're interested in (here, say the touchpad entry). Then, you list the properties you can set/get using:
~ xinput --list-props "SynPS/2 Synaptics TouchPad"
[...]
        Synaptics Edge Scrolling (269): 0, 0, 0
 
The list is quite impressive, so I have only shown the one I'm interested in. You see here everything is 0, which probably explains why edge scrolling is disable (I don't have a clue what the actual numbers mean). You can finally change the properties this way:
xinput --set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling"  6 6 6
This gave me back edge scrolling. I used a similar approach to enable again the third button emulation... What is neat here is that the property names are readable enough, and there's a lot of them to play with. Great !

20 April 2011

Niels Thykier: Update on Lintian 2.5.0~rc3

While we are waiting for Lintian 2.5.0~rc3, here is a little update on what you can look forward to. About a week ago I had the pleasure of merging my branch into the Lintian master branch. While the IRC bot DOS ed the #debian-qa channel[SRY], cross-package checks became part of the official Lintian. Beyond the reduced amount of binary-without-manpage false-positives, circular-dependency checking and a partial broken symlink detector, the 2.5.0~rc3 release will also feature java and multiarch checks (kudos to Vincent Fourmond and Steve R. Langasek, respectively). The new java checks are based on the Java Policy and currently mostly covers checking for possibly build misconfigurations (jars without class files etc.), weird classpaths and missing Main-Class/depends on jarwrapper for executable jars. Note that #539315 has not been fixed, so executable jars will still trigger a warning. For people wanting to upgrade their libraries to multiarch, Lintian will have a check to see if you remember the Pre-Depends on multiarch-support. Personally I have not followed the progress of multiarch too closely, but last I checked multiarch-support was not in unstable. I guess we are ahead on this one. :) Other highlights include dont install stuff in /run , armhf support, less false positive on missing B-D on dh_python 2,3 and recognition of 3.9.2 as the latest version of the Policy Manual. I am also planning on starting a new branch and this time I intend to work on Vendor-based customization of Lintian. If you have any ideas/suggestions, by all means follow up on the thread on the Lintian list. [SRY] Sorry to anyone present in the channel!

Next.

Previous.